package com.homework.data0318.work2;

public class Graphics {
    String name;

    double r;

    double wide;
    double longer;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getR() {
        return r;
    }

    public void setR(double r) {
        this.r = r;
    }

    public double getWide() {
        return wide;
    }

    public void setWide(double wide) {
        this.wide = wide;
    }

    public double getLonger() {
        return longer;
    }

    public void setLonger(double longer) {
        this.longer = longer;
    }

    public void drawing(){
       System.out.println(this.name+"正在绘图");
   }
    public double area(){
        double c  = 3.14*this.r*this.r;
        System.out.println(c);
        return c;
    }

    public double area1(){
        double b =this.longer*this.wide;
        System.out.println(b);
        return b;
    }
}
